package com.s3.khospitalds.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.s3.khospitalds.entity.Turnover;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: xw
 * @CreateTime: 2025/2/20
 * @Description: 护士离职类
 * @Version: 1.0
 */
@Mapper
@Repository
public interface TurnoverMapper extends BaseMapper<Turnover> {
    @Select("SELECT * FROM turnover")
    List<Turnover> selectAll();
    @Insert("INSERT INTO turnOver (`name`, number, age, sex, department, `position`, processor, address, hiredate, resignation_time, resignation_reason, seniority) VALUES\n" +
            "(#{name} ,#{number} , #{age} , #{sex} , #{department} , #{position} , #{processor} , #{address} ,#{hiredate} , #{resignationTime} ,#{resignationReason} , #{seniority} )")
    public int insert(Turnover turnover);
}
